package com.roadjava.demo07;

import com.roadjava.Application;
import com.roadjava.Builder;
import com.roadjava.beans.dto.CarDTO;
import com.roadjava.beans.vo.CarVO;
import com.roadjava.convert.demo07.CarConvert07;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
public class MapStructTest07 {

    @Autowired
    private CarConvert07 carConvert;

    @Test
    public void test() {
        CarDTO carDTO = Builder.buildCarDTO();

        CarVO carVO = carConvert.dto2vo(carDTO);
        System.out.println(carVO);
    }

}